<!DOCTYPE html>
<html>

<head>
  <meta charset="UTF-8" />
  <title>05_事件绑定</title>
  <!-- 引入Vue -->
  <script type="text/javascript" src="../js/vue.js"></script>
</head>

<body>
  <!-- 准备好一个容器-->
  <div id="demo">
    <h2>{{school}}</h2>
    <h2>{{adressL}}</h2>
    <button v-on:click="getdata">点击查看学校地址</button>
  </div>
</body>

<script type="text/javascript">
  //阻止 vue 在启动时生成生产提示。
  Vue.config.productionTip = false;
  new Vue({
    el: '#demo',
    data: {
      school: '尚硅谷',
      adressL: "北京昌平",
      phone: '010-56253825'
    },
    methods: {
      getdata() {
        alert(this.phone)
      }
    }
  })
</script>

</html>